package me.huha.commons;

import java.io.Serializable;
import java.util.Map;

/**
 * @Title: ElasticSearchDTO.java
 * @Author: Yepx
 * @mail: yepx2013@gmail.com
 * @CreateTime: 2017年9月29日 下午4:03:16
 * @Todo: ElasticSearch 数据封装
 */
public class ElasticSearchDTO implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = -9219806785930771752L;
	private String id;
	private String index;
	private String type;
	private Map<String, Object> source;
	
	public ElasticSearchDTO() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public ElasticSearchDTO(String id, String index, String type,
			Map<String, Object> source) {
		super();
		this.id = id;
		this.index = index;
		this.type = type;
		this.source = source;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getIndex() {
		return index;
	}

	public void setIndex(String index) {
		this.index = index;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Map<String, Object> getSource() {
		return source;
	}

	public void setSource(Map<String, Object> source) {
		this.source = source;
	}

	@Override
	public String toString() {
		return "ElasticSearchDTO [id=" + id + ", index=" + index + ", type="
				+ type + ", source=" + source + "]";
	}
}
